package com.xgj.entity;

public class RandomUser {
    private Long id; // 主键
    private String gender;
    private String email;
    private String phone;
    private String nat;
    private Long nameId; // 关联 name 表的主键
    private Long loginId; // 关联 login 表的主键
    private Long pictureId; // 关联 picture 表的主键

    //数据库这张表是没有下面这3个字段的
    private Name name; // 关联 Name 实体
    private Login login; // 关联 Login 实体
    private Picture picture; // 关联 Picture 实体

    // 构造方法
    public RandomUser() {}

    public RandomUser(String gender, String email, String phone, String nat, Name name, Login login, Picture picture) {
        this.gender = gender;
        this.email = email;
        this.phone = phone;
        this.nat = nat;
        this.name = name;
        this.login = login;
        this.picture = picture;
    }

    // getter/setter
    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getGender() {
        return gender;
    }

    public void setGender(String gender) {
        this.gender = gender;
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public String getNat() {
        return nat;
    }

    public void setNat(String nat) {
        this.nat = nat;
    }

    public Long getNameId() {
        return nameId;
    }

    public void setNameId(Long nameId) {
        this.nameId = nameId;
    }

    public Long getLoginId() {
        return loginId;
    }

    public void setLoginId(Long loginId) {
        this.loginId = loginId;
    }

    public Long getPictureId() {
        return pictureId;
    }

    public void setPictureId(Long pictureId) {
        this.pictureId = pictureId;
    }

    public Name getName() {
        return name;
    }

    public void setName(Name name) {
        this.name = name;
    }

    public Login getLogin() {
        return login;
    }

    public void setLogin(Login login) {
        this.login = login;
    }

    public Picture getPicture() {
        return picture;
    }

    public void setPicture(Picture picture) {
        this.picture = picture;
    }

    // toString
    @Override
    public String toString() {
        return "RandomUser{" +
                "id=" + id +
                ", gender='" + gender + '\'' +
                ", email='" + email + '\'' +
                ", phone='" + phone + '\'' +
                ", nat='" + nat + '\'' +
                ", nameId=" + nameId +
                ", loginId=" + loginId +
                ", pictureId=" + pictureId +
                ", name=" + name +
                ", login=" + login +
                ", picture=" + picture +
                '}';
    }
}
